package sd.czw.com.mmgapp.mcallback;


import com.google.gson.Gson;
import com.zhy.http.okhttp.callback.Callback;

import okhttp3.Response;
import sd.czw.com.mmgapp.model.categorybean.CategoryTitleInfo;

/**
 * Created by czw
 * desc 描述：
 * on 2017/7/7.
 */
public abstract class CategeroyTitleCallback extends Callback<CategoryTitleInfo> {

    @Override
    public CategoryTitleInfo parseNetworkResponse(Response response, int id) throws Exception {
        String string = response.body().string();
        CategoryTitleInfo categoryTitleInfo = new Gson().fromJson(string, CategoryTitleInfo.class);
        return categoryTitleInfo;
    }
}
